3.261 \(\int \frac{(e+f x) \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx\)

Optimal. Leaf size=56 \[ \frac{i f \sinh (c+d x)}{a d^2}-\frac{i (e+f x) \cosh (c+d x)}{a d}+\frac{e x}{a}+\frac{f x^2}{2 a} \]

[Out]

(e*x)/a + (f*x^2)/(2*a) - (I*(e + f*x)*Cosh[c + d*x])/(a*d) + (I*f*Sinh[c + d*x])/(a*d^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0715893, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103, Rules used = {5563, 3296, 2637} \[ \frac{i f \sinh (c+d x)}{a d^2}-\frac{i (e+f x) \cosh (c+d x)}{a d}+\frac{e x}{a}+\frac{f x^2}{2 a} \]

Antiderivative was successfully verified.

[In]

Int[((e + f*x)*Cosh[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]

[Out]

(e*x)/a + (f*x^2)/(2*a) - (I*(e + f*x)*Cosh[c + d*x])/(a*d) + (I*f*Sinh[c + d*x])/(a*d^2)

Rule 5563

Int[(Cosh[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sinh[(c_.) + (d_.)*(x_)]), x_Symb
ol] :> Dist[1/a, Int[(e + f*x)^m*Cosh[c + d*x]^(n - 2), x], x] + Dist[1/b, Int[(e + f*x)^m*Cosh[c + d*x]^(n -
2)*Sinh[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && EqQ[a^2 + b^2, 0]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{(e+f x) \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac{i \int (e+f x) \sinh (c+d x) \, dx}{a}+\frac{\int (e+f x) \, dx}{a}\\ &=\frac{e x}{a}+\frac{f x^2}{2 a}-\frac{i (e+f x) \cosh (c+d x)}{a d}+\frac{(i f) \int \cosh (c+d x) \, dx}{a d}\\ &=\frac{e x}{a}+\frac{f x^2}{2 a}-\frac{i (e+f x) \cosh (c+d x)}{a d}+\frac{i f \sinh (c+d x)}{a d^2}\\ \end{align*}

Mathematica [A]  time = 0.638456, size = 57, normalized size = 1.02 \[ -\frac{(c+d x) (c f-2 d e-d f x)+2 i d (e+f x) \cosh (c+d x)-2 i f \sinh (c+d x)}{2 a d^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)*Cosh[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]

[Out]

-((c + d*x)*(-2*d*e + c*f - d*f*x) + (2*I)*d*(e + f*x)*Cosh[c + d*x] - (2*I)*f*Sinh[c + d*x])/(2*a*d^2)

________________________________________________________________________________________

Maple [A]  time = 0.04, size = 84, normalized size = 1.5 \begin{align*} -{\frac{1}{a{d}^{2}} \left ( if \left ( \left ( dx+c \right ) \cosh \left ( dx+c \right ) -\sinh \left ( dx+c \right ) \right ) -icf\cosh \left ( dx+c \right ) +ide\cosh \left ( dx+c \right ) -{\frac{f \left ( dx+c \right ) ^{2}}{2}}+cf \left ( dx+c \right ) -de \left ( dx+c \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x)

[Out]

-1/d^2/a*(I*f*((d*x+c)*cosh(d*x+c)-sinh(d*x+c))-I*c*f*cosh(d*x+c)+I*d*e*cosh(d*x+c)-1/2*f*(d*x+c)^2+c*f*(d*x+c
)-d*e*(d*x+c))

________________________________________________________________________________________

Maxima [B]  time = 1.50894, size = 254, normalized size = 4.54 \begin{align*} \frac{1}{4} \, f{\left (\frac{4 \, x e^{\left (d x + c\right )}}{a d e^{\left (d x + c\right )} - i \, a d} + \frac{-2 i \, d^{2} x^{2} e^{c} - 2 i \, d x e^{c} -{\left (2 i \, d x e^{\left (3 \, c\right )} - 2 i \, e^{\left (3 \, c\right )}\right )} e^{\left (2 \, d x\right )} + 2 \,{\left (d^{2} x^{2} e^{\left (2 \, c\right )} - 3 \, d x e^{\left (2 \, c\right )} + e^{\left (2 \, c\right )}\right )} e^{\left (d x\right )} - 2 \,{\left (d x + 1\right )} e^{\left (-d x\right )} - 2 i \, e^{c}}{a d^{2} e^{\left (d x + 2 \, c\right )} - i \, a d^{2} e^{c}}\right )} + \frac{1}{4} \, e{\left (\frac{4 \,{\left (d x + c\right )}}{a d} - \frac{2 i \, e^{\left (d x + c\right )}}{a d} - \frac{2 i \, e^{\left (-d x - c\right )}}{a d}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")

[Out]

1/4*f*(4*x*e^(d*x + c)/(a*d*e^(d*x + c) - I*a*d) + (-2*I*d^2*x^2*e^c - 2*I*d*x*e^c - (2*I*d*x*e^(3*c) - 2*I*e^
(3*c))*e^(2*d*x) + 2*(d^2*x^2*e^(2*c) - 3*d*x*e^(2*c) + e^(2*c))*e^(d*x) - 2*(d*x + 1)*e^(-d*x) - 2*I*e^c)/(a*
d^2*e^(d*x + 2*c) - I*a*d^2*e^c)) + 1/4*e*(4*(d*x + c)/(a*d) - 2*I*e^(d*x + c)/(a*d) - 2*I*e^(-d*x - c)/(a*d))

________________________________________________________________________________________

Fricas [A]  time = 2.15053, size = 178, normalized size = 3.18 \begin{align*} \frac{{\left (-i \, d f x - i \, d e +{\left (-i \, d f x - i \, d e + i \, f\right )} e^{\left (2 \, d x + 2 \, c\right )} +{\left (d^{2} f x^{2} + 2 \, d^{2} e x\right )} e^{\left (d x + c\right )} - i \, f\right )} e^{\left (-d x - c\right )}}{2 \, a d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")

[Out]

1/2*(-I*d*f*x - I*d*e + (-I*d*f*x - I*d*e + I*f)*e^(2*d*x + 2*c) + (d^2*f*x^2 + 2*d^2*e*x)*e^(d*x + c) - I*f)*
e^(-d*x - c)/(a*d^2)

________________________________________________________________________________________

Sympy [A]  time = 1.10237, size = 194, normalized size = 3.46 \begin{align*} \begin{cases} \frac{\left (\left (- 2 i a^{3} d^{5} e e^{c} - 2 i a^{3} d^{5} f x e^{c} - 2 i a^{3} d^{4} f e^{c}\right ) e^{- d x} + \left (- 2 i a^{3} d^{5} e e^{3 c} - 2 i a^{3} d^{5} f x e^{3 c} + 2 i a^{3} d^{4} f e^{3 c}\right ) e^{d x}\right ) e^{- 2 c}}{4 a^{4} d^{6}} & \text{for}\: 4 a^{4} d^{6} e^{2 c} \neq 0 \\- \frac{x^{2} \left (i f e^{2 c} - i f\right ) e^{- c}}{4 a} - \frac{x \left (i e e^{2 c} - i e\right ) e^{- c}}{2 a} & \text{otherwise} \end{cases} + \frac{e x}{a} + \frac{f x^{2}}{2 a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cosh(d*x+c)**2/(a+I*a*sinh(d*x+c)),x)

[Out]

Piecewise((((-2*I*a**3*d**5*e*exp(c) - 2*I*a**3*d**5*f*x*exp(c) - 2*I*a**3*d**4*f*exp(c))*exp(-d*x) + (-2*I*a*
*3*d**5*e*exp(3*c) - 2*I*a**3*d**5*f*x*exp(3*c) + 2*I*a**3*d**4*f*exp(3*c))*exp(d*x))*exp(-2*c)/(4*a**4*d**6),
 Ne(4*a**4*d**6*exp(2*c), 0)), (-x**2*(I*f*exp(2*c) - I*f)*exp(-c)/(4*a) - x*(I*e*exp(2*c) - I*e)*exp(-c)/(2*a
), True)) + e*x/a + f*x**2/(2*a)

________________________________________________________________________________________

Giac [B]  time = 1.16307, size = 312, normalized size = 5.57 \begin{align*} \frac{d^{2} f x^{2} e^{\left (2 \, d x + 3 \, c\right )} - i \, d^{2} f x^{2} e^{\left (d x + 2 \, c\right )} - i \, d f x e^{\left (3 \, d x + 4 \, c\right )} + 2 \, d^{2} x e^{\left (2 \, d x + 3 \, c + 1\right )} - d f x e^{\left (2 \, d x + 3 \, c\right )} - 2 i \, d^{2} x e^{\left (d x + 2 \, c + 1\right )} - i \, d f x e^{\left (d x + 2 \, c\right )} - d f x e^{c} - i \, d e^{\left (3 \, d x + 4 \, c + 1\right )} + i \, f e^{\left (3 \, d x + 4 \, c\right )} - d e^{\left (2 \, d x + 3 \, c + 1\right )} + f e^{\left (2 \, d x + 3 \, c\right )} - i \, d e^{\left (d x + 2 \, c + 1\right )} - i \, f e^{\left (d x + 2 \, c\right )} - d e^{\left (c + 1\right )} - f e^{c}}{2 \,{\left (a d^{2} e^{\left (2 \, d x + 3 \, c\right )} - i \, a d^{2} e^{\left (d x + 2 \, c\right )}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="giac")

[Out]

1/2*(d^2*f*x^2*e^(2*d*x + 3*c) - I*d^2*f*x^2*e^(d*x + 2*c) - I*d*f*x*e^(3*d*x + 4*c) + 2*d^2*x*e^(2*d*x + 3*c
+ 1) - d*f*x*e^(2*d*x + 3*c) - 2*I*d^2*x*e^(d*x + 2*c + 1) - I*d*f*x*e^(d*x + 2*c) - d*f*x*e^c - I*d*e^(3*d*x
+ 4*c + 1) + I*f*e^(3*d*x + 4*c) - d*e^(2*d*x + 3*c + 1) + f*e^(2*d*x + 3*c) - I*d*e^(d*x + 2*c + 1) - I*f*e^(
d*x + 2*c) - d*e^(c + 1) - f*e^c)/(a*d^2*e^(2*d*x + 3*c) - I*a*d^2*e^(d*x + 2*c))